import request from '@/utils/request'
import { otherFiltersItem } from '@/utils'
/**
 * 按所属阶段获取异常配置
 * @param {*} v
 * @returns
 */
export function postConfigExceptionHandles(belongStage) {
  const data = new FormData()
  data.append('pageFlag', false)
  data.append('filtersRaw', JSON.stringify([otherFiltersItem('belongStage', belongStage, '=')]))
  return request({
    url: '/api/v1/configExceptionHandle/page',
    method: 'POST',
    data
  }).then(res => {
    return {
      data: res.data.records
    }
  })
}
/**
 * 新增门店异常
 * @param {*} data
 * @returns
 */
export function postShopException(data) {
  return request({
    url: '/api/v1/shopException',
    method: 'POST',
    data
  })
}
